<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>检测jQuery库是否已经加载</title>
<script type="text/javascript">
   //判断是否加载jQuery，如果未加载则手动写入jQuery加
   window.jQuery||document.write('<script type="text/javascript" src="jquery/jquery-1.9.1.min.js"> </script\>');
</script>   
</head>

<body>
<script type="text/javascript">
   if (window.jQuery) {     //在页面中判断jQuery是否已经加载
	  document.write("jQuery已经加载");
	} else { 
	  document.write("jQuery没有加载");
	}
</script>   
</body>
</html>
